function Dy = cutDataToSingleYear(Data,Year)
    Dy = Data;
    SS = find(Data.appYear == Year);
    JJ = find(Data.optionYear == Year);
    %
    Dy.Scholarships = Data.Scholarships(SS,:);
    Dy.admitIN = Data.admitIN(SS,:);
    Dy.Scores = Data.Scores(SS,:);
    Dy.Sinorm = Data.Sinorm(SS,:);
    Dy.StudentXs = Data.StudentXs(SS,:);
    Dy.LocationXi = Data.LocationXi(SS,:);
    Dy.AidAmount = Data.AidAmount(SS,:);
    Dy.XiReferenceTuition = Data.XiReferenceTuition(SS,:);
    Dy.appYear = Data.appYear(SS,:);
    Dy.AppsTruthFullRank = Data.AppsTruthFullRank(SS,:);
    Dy.AppsExPostWaitlistFeasibles = Data.AppsExPostWaitlistFeasibles(SS,:);
    Dy.Index = Data.Index(SS,JJ);
    Dy.NoApp = Data.NoApp(SS,:);
    Dy.current_cohort = Data.current_cohort(SS,:);
    Dy.old_cohort1 = Data.old_cohort1(SS,:);
    Dy.old_cohort2 = Data.old_cohort2(SS,:);
    Dy.old_cohort3 = Data.old_cohort3(SS,:);
    Dy.old_cohort4 = Data.old_cohort4(SS,:);
    Dy.old_cohort5 = Data.old_cohort5(SS,:);
    Dy.past_enrollment1 = Data.past_enrollment1(SS,:);
    Dy.past_enrollment2 = Data.past_enrollment2(SS,:);
    Dy.past_enrollment3 = Data.past_enrollment3(SS,:);
    Dy.AppsCalledWaitlist = Data.AppsCalledWaitlist(SS,:);
    Dy.AssignedApp = Data.AssignedApp(SS,:);
    Dy.FeasibleAny = Data.FeasibleAny(SS,JJ);
    Dy.ExPostFeasible = Data.ExPostFeasible(SS,JJ);
    Dy.ExPostWaitlistFeasible = Data.ExPostWaitlistFeasible(SS,JJ);
    Dy.FeasibleOff = Data.FeasibleOff(SS,JJ);
    %%
    Dy.ApplicationsIndex = Data.ApplicationsIndex(SS,:); %raw apps, export these to julia
    Dy.ChoiceIndexRank = Data.ChoiceIndexRank(SS,:);     %already restricted in matlab, don't use
    Dy.enrollment = Data.enrollment(SS,:);
    % FIX: entry is an index, need it to be a within-year index
    tmp1 = Dy.ChoiceIndexRank;
    tmp2 = Dy.ApplicationsIndex;
    tmp3 = Dy.enrollment;
    for jj=1:length(JJ)
        Dy.ChoiceIndexRank(tmp1 == JJ(jj)) = jj;
        Dy.ApplicationsIndex(tmp2 == JJ(jj)) = jj;
        Dy.enrollment(tmp3 == JJ(jj)) = jj;
    end
    %%
    Dy.grad6 = Data.grad6(SS,:);
    %
    Dy.OptionID = Data.OptionID(JJ,:);
    Dy.optionYear = Data.optionYear(JJ,:);
    Dy.InstCode = Data.InstCode(JJ,:);
    Dy.MajorCode = Data.MajorCode(JJ,:);
    Dy.OptionSelectivity = Data.OptionSelectivity(JJ,:);
    Dy.OptionXj = Data.OptionXj(JJ,:);
    Dy.OptionXjnorm = Data.OptionXjnorm(JJ,:);
    Dy.LocationXj = Data.LocationXj(JJ,:);
    Dy.ArancelXj = Data.ArancelXj(JJ,:);
    Dy.ArancelReferencialXj = Data.ArancelReferencialXj(JJ,:);
    Dy.BVPj = Data.BVPj(JJ,:);
    Dy.slots = Data.slots(JJ,:);
    Dy.TypeIndex = Data.TypeIndex(JJ,:);
    Dy.offPlatform = Data.offPlatform(JJ,:);
end